package cwb
// TODO: Remove, effectively a symbol.
class Value(s: Symbol) extends Ordered[Value] {  
  val sym = s
  def valueOf = sym.name
  
  override
  def equals(rhs: Any) = rhs.getClass() == classOf[Value] &&
                         rhs.asInstanceOf[Value].sym == sym
  
  override
  def compare(right: Value) = valueOf.compare(right.valueOf)
  
  override
  def toString() = sym.name
  
  override 
  def hashCode() = s.hashCode()
  
}

object Value {
  def fromString(s: String) = new Value(Symbol(s))  
}